<html>
<head>
  <title>Wiki view</title>
    <link href="/wiki/wiki.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<div class ="wikitop">%[LUA]{{{
local editUrlBase = model.emitContentFromPath('/root/wiki/edit-url');
local editUrl;

if model.existElement('/root/wiki/SecureEdit') then
  print( '<small>secure TODO</small>&nbsp;' );
  editUrl = "https:" .. model.emitContentFromPath('/root/REQUEST/url/server') .. editUrlBase;
else
  editUrl = editUrlBase;
end

if model.existElement('/root/wiki/DoesNotExist') then
	print( '<a href=\"' .. editUrl .. '">create</a>'); 
else
	print( '<a href=\"' .. editUrl .. '">edit</a>'); 
end

}}}[LUA]%</div>
<hr/>
  <div class="wikibody_view" id="wiki_body">%[LUA]{{{
print( model.emitContentFromPath("/root/wiki/row/data") );
}}}[LUA]%</div>
</body>
</html>
